package cn.hdu.liang.concurrency;

class ExamThread implements Runnable {
    public ExamThread() {
        System.out.println("ExamThread 构造");
    }

    @Override
    public void run() {
        for(int i = 0; i < 3; i++) {
            System.out.println(Thread.currentThread().getName());
            Thread.yield();
        }
    }
}

public class Exam1 {
    public static void main(String[] args) {
        Thread[] et = new Thread[100];
        for(int i = 0; i < 100; i++) {
            et[i] = new Thread(new ExamThread());
            et[i].start();
        }
        System.out.println("Main 函数结束");
    }
}
